Changing views to trigger DXL

Can a user open a module and change the view to trigger DXL or does a DXL script have to be run first and then the view saved?
lsand - Tue Oct 05 15:29:48 EDT 2010

Re: Changing views to trigger DXL
Mathias Mamsch - Wed Oct 06 03:34:04 EDT 2010

I don't get what you are saying. What are you trying to do? You want to run a script, when the user opens a module? Or when he changes a view? In what case do you want to save a view? Can you elaborate?

Regards, Mathias

Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Changing views to trigger DXL
lsand - Wed Oct 06 12:28:13 EDT 2010

Mathias Mamsch - Wed Oct 06 03:34:04 EDT 2010
I don't get what you are saying. What are you trying to do? You want to run a script, when the user opens a module? Or when he changes a view? In what case do you want to save a view? Can you elaborate?

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

I'm still new to DXL but the way I've been creating different views for a particular module is by first opening a module, then running a DXL script to create DXL layout columns and then saving that particular view. If changes are then made to the same module, and the previous saved view with the layout DXL column is opened, the DXL layout column would not be automatically updated (if applicable), in other words opening the saved view would not automatically trigger the DXL to run..

Is it possible to open a particular view that would then trigger some DXL code?

Re: Changing views to trigger DXL
Mathias Mamsch - Wed Oct 06 16:48:08 EDT 2010

lsand - Wed Oct 06 12:28:13 EDT 2010
I'm still new to DXL but the way I've been creating different views for a particular module is by first opening a module, then running a DXL script to create DXL layout columns and then saving that particular view. If changes are then made to the same module, and the previous saved view with the layout DXL column is opened, the DXL layout column would not be automatically updated (if applicable), in other words opening the saved view would not automatically trigger the DXL to run..

Is it possible to open a particular view that would then trigger some DXL code?

Maybe that would be possible if the DXL Layout column updates itself. But I cannot imagine why it would be necessary to do that. DXL Layout is evaluated on every mouse click, why would you need to create different DXL layout columns in case of some modifications. Can't you do a column that will show the right value anyway?

Regards, Mathias


Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Changing views to trigger DXL
llandale - Wed Oct 06 17:35:12 EDT 2010

lsand - Wed Oct 06 12:28:13 EDT 2010
I'm still new to DXL but the way I've been creating different views for a particular module is by first opening a module, then running a DXL script to create DXL layout columns and then saving that particular view. If changes are then made to the same module, and the previous saved view with the layout DXL column is opened, the DXL layout column would not be automatically updated (if applicable), in other words opening the saved view would not automatically trigger the DXL to run..

Is it possible to open a particular view that would then trigger some DXL code?

I think you are saying that sometimes when you open a view with a Layout column, it appears that Layout DXL is not executing and you are seeing some old value of it for each object.

If so: No, you are wrong. Layout column values are not saved (neither are Attr-DXL values). If you see the value then it was calculated recently; in the case of Layout very recently. If you are sure the displayed value is wrong then there is something wrong with your Layout code. You should post it so we can debug it.

If you are suggesting that changes to a module would require you to change the code embedded in some layout of some view and to do so 'automatically', then my response would be that you surely either have a problem that can be solved much easier some other way, or you think you have a problem that you don't really have, and that you are way over your head. But if you REALLY wanted to be able to code something like that then it would be MUCH simpler to just embed all that clever code right in the layout in the first place; which might look something like this:

if (the current state of the module is such-and-thus)
{  calculate and display my Layout like thusly
}
elseif (the current state of the module is this-and-that)
{  calculate and display my Layout like that
}
elseif (bla bla bla)
{
}
lots of elseif statements


That must be easier than coding clever stuff like that into some load-view trigger, which doesn't exist.

Avoid using the word 'trigger' since it has a specific meaning in DXL, specifically 'Trigger DXL'. Perhaps you mean 'fire' or 'initiate' some DXL.

If you are REALLY talking about 'views' and 'triggers': There are no Trigger Events associated with changing views. It would be very difficult to simulate a change-view trigger using some clever Layout DXL; although I suppose there are perhaps 5 folks in the world that could do it reasonably if they set their mind to it. That's an invitation to the other 4 to waste a lot of their time and give it a whirl!

Yes, I'm much longer winded than Mathias, but he's right. Tell us what the problem is (not the issues you are having trying to solve it) and surely we can solve it.

 

 

  • Louie

 

 

Re: Changing views to trigger DXL
BobSherman - Mon Sep 24 07:04:55 EDT 2012

I need a trigger to run on view changes because the filter I want to apply in a particular view is more complex than can be delivered by the standard filtering wizard/pop-up (i.e. I need to do the filter-on/off and accept/reject based on sophisticated logic in DXL). Is there such a thing as a view trigger? If not, does anyone have another idea on how to attack this problem? Note: this module would be normally opened in shared mode and is the subject of a lot of edits (heavy usage)... so performance/responsiveness of the module must not suffer with the solution.

Re: Changing views to trigger DXL
Peter_Albert - Mon Sep 24 08:05:04 EDT 2012

BobSherman - Mon Sep 24 07:04:55 EDT 2012
I need a trigger to run on view changes because the filter I want to apply in a particular view is more complex than can be delivered by the standard filtering wizard/pop-up (i.e. I need to do the filter-on/off and accept/reject based on sophisticated logic in DXL). Is there such a thing as a view trigger? If not, does anyone have another idea on how to attack this problem? Note: this module would be normally opened in shared mode and is the subject of a lot of edits (heavy usage)... so performance/responsiveness of the module must not suffer with the solution.

As written above, there is no trigger event on View change. You could put the filter logic into an attribute DXL, which finally results in a string result being "hide" or "show" or something like that, and then use a simple filter on that attribute.

Peter

Re: Changing views to trigger DXL
llandale - Mon Sep 24 14:44:08 EDT 2012

BobSherman - Mon Sep 24 07:04:55 EDT 2012
I need a trigger to run on view changes because the filter I want to apply in a particular view is more complex than can be delivered by the standard filtering wizard/pop-up (i.e. I need to do the filter-on/off and accept/reject based on sophisticated logic in DXL). Is there such a thing as a view trigger? If not, does anyone have another idea on how to attack this problem? Note: this module would be normally opened in shared mode and is the subject of a lot of edits (heavy usage)... so performance/responsiveness of the module must not suffer with the solution.

Eeeck. let me think outloud.

Attr-DXL that violates natural attr-dxl "scope" of "this object".
  • current = module(obj)
  • filtering off
  • for o in entire mod do {o.attrDXLName = "."} // I wonder in v9 if "" is adequate
  • for o in entire mod do
  • { do clever logic and either "accept" or "reject" this object o}
  • filtering on

Put it in your view.

The first loop sets the attr-DXL value for all other objects insuring that this code is only run ONCE when the attr DXL is displayed.

-Louie